﻿using System.Collections.Generic;
using Cms.Domain;
using Cms.Domain.RepositoryInterfaces;
using NHibernate;

namespace Cms.Data
{
    public class FolderRepository : BaseRepository, IFolderRepository
    {
        public FolderRepository()
        {
        }
        
        public FolderRepository(ISession session)
            : base(session)
        {
        }

        #region IFolderRepository Members

        public Folder GetFolder(int id)
        {
            return Session.Get<Folder>(id);
        }
        
        public void SaveFolder(Folder folder)
        {
            SaveEntity(folder, "FolderRepository.SaveFolder");
        }

        #endregion
    }
}